import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import Vant from 'vant'
import 'vant/lib/index.css';
import 'lib-flexible/flexible'

Vue.use(Vant);
Vue.config.productionTip = false
router.beforeEach((to, from, next) => {
  if (to.name) {
    var ua = navigator.userAgent.toLowerCase();
    if (ua.indexOf('dingtalk') >= 0) {
      dd.ready(function () {
        dd.biz.navigation.setTitle({
          title: to.name,
        })
      })
    } else {
      document.title = to.name
    }
  }
  next()
})
new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')
